    <div class="modal fade" id="notlogin_modal" tabindex="-1" role="dialog" 
	   aria-labelledby="myModalLabel" aria-hidden="true">
	   <div class="modal-dialog">
	      <div class="modal-content">
	         <div class="modal-header">
	            <button type="button" class="close" 
	               data-dismiss="modal" aria-hidden="true">
	                  &times;
	            </button>
	            <h4 class="modal-title">
	               	无法使用
	            </h4>
	         </div>
	         <div class="modal-body">
				请先登录账户再使用这个功能！
	         </div>
	         <div class="modal-footer">
	            <button type="button" class="btn btn-default" 
	               data-dismiss="modal">关闭
	            </button>
	            <button onclick="R.goIndex('notlogin_modal')" type="button" class="btn btn-primary">
	              	返回首页
	            </button>
	         </div>
	      </div>
	     </div>
	</div>
	<div class="modal fade" id="msg_modal" tabindex="-1" role="dialog" 
	   aria-labelledby="myModalLabel" aria-hidden="true">
	   <div class="modal-dialog">
	      <div class="modal-content">
	         <div class="modal-header">
	            <button type="button" class="close" 
	               data-dismiss="modal" aria-hidden="true">
	                  &times;
	            </button>
	            <h4 class="modal-title">
	               	提示
	            </h4>
	         </div>
	         <div class="modal-body" id="msg_text">
	         </div>
	         <div class="modal-footer">
	            <button type="button" class="btn btn-default" 
	               data-dismiss="modal">关闭
	            </button>
	         </div>
	      </div>
	     </div>
	</div>
	<script>
	R.showMsg = function(text){
    	$("#msg_text").html(text);
    	$("#msg_modal").modal("show");
    }
    R.notLogin = function(){
    	$('#notlogin_modal').modal("show");
    }
    R.goIndex = function(id){
    	$('#' + id).modal("hide");
    	setTimeout(function(){
    		route.go('template/index.et.html');
    	}, 500);
    }
	R.showAlert = function(msg,id){
    		$("#"+id).html(msg);
			$("#"+id).css("display","block");
			setTimeout(function(){
				$("#"+id).css("display","none");
			},3000);
    }
    R.showToast = function(msg){
    	layer.open({
		    content: msg,
		    skin: 'msg',
		    time: 2
		});
	}
	R.showLoading = function(msg){
		layer.open({
    		type: 2,
			content: msg
 		});
	}
	R.closeAll = function(){
		layer.closeAll();
	}
	</script>